package com.devshephard.designModel.agentModel;


import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test_IUserDao {

    public static void main(String[] args) throws Exception {

        BeanFactory beanFactory = new DefaultListableBeanFactory();

        //直接代理
        IUserDao iUserDao = new MapperFactoryBean<IUserDao>(IUserDao.class).getObject();

        //交给spring管理，解耦合
        //IUserDao userDao = beanFactory.getBean("userDao", IUserDao.class);
        String res = iUserDao.queryUserInfo("100001");
        String res2 = iUserDao.queryUserInfo2("88888");
        System.out.println(res);
        System.out.println(res2);
        //System.out.println(res2);
    }


        }